package com.manner.groupon.controller.admin;

import com.manner.groupon.common.BaseResponse;
import com.manner.groupon.model.dto.grouponCoupons.CouponPackageDTO;
import com.manner.groupon.service.groupon.GroupPurchasePackageService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/coupon-package")
@RequiredArgsConstructor

public class CouponPackageController {

    @Resource
    private GroupPurchasePackageService groupPurchasePackageService;

    /**
     * @param data
     * @return BaseResponse<String>
     * @description: 增加团购优惠券的套餐内容
     * @author Manner
     * @date 2024/11/12 18:26
     */
    @PostMapping
    public BaseResponse<String> save(@RequestBody CouponPackageDTO data) {
        return groupPurchasePackageService.savePackage(data);
    }
}
